﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<link
	href=" ${path }/resource/plugin/bootstrap-3.3.5/css/bootstrap.min.css"
	rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="${path }/resource/css/index.min.css" />

<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>
	
	
<link rel="stylesheet" type="text/css"
	href="${path }/resource/plugin/kindeditor/themes/default/default.css" />
<link rel="stylesheet" type="text/css"
	href="${path }/resource/plugin/kindeditor/plugins/code/prettify.css" />
<script type="text/javascript"
	src="${path }/resource/plugin/kindeditor/kindeditor.js"></script>
<script type="text/javascript"
	src="${path }/resource/plugin/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript"
	src="${path }/resource/plugin/kindeditor/plugins/code/prettify.js"></script>

<style type="text/css">
</style>
<title>GeeK开发者中心</title>
</head>
<body>
	<div class="" style="margin-top: 50px">
		<div class="row">
			<div class="col-sm-12">
				<div class="panel panel-danger">
					<div class="panel-heading">
						<h3 class="panel-title">异常信息</h3>
					</div>
					<div class="panel-body" id="appBox2">
						<form class="form-horizontal" id="dataform"
							onsubmit="javascripr:return false;">
			<input type="hidden" name="id" value="${ex.id }">
							<table class="table table-striped">
								<tr>
									<td style="width: 200px">项目</td>
									<td>NO.${ex.projNo }-${ex.projName}</td>
								</tr>
								<tr>
									<td style="width: 200px">机器名称</td>
									<td>${ex.machine }</td>
								</tr>
								<tr>
									<td style="width: 200px">异常发生时间</td>
									<td><fmt:formatDate value='${ex.createTime }' type="date"
											pattern="yyyy-MM-dd hh:mm:ss" /></td>
								</tr>
								<tr>
									<td style="width: 200px">追踪码</td>
									<td>${ex.mdc }</td>
								</tr>
								<tr>
									<td style="width: 200px">异常类型</td>
									<td>${ex.exceptionType }</td>
								</tr>
								<tr>
									<td style="width: 200px">异常信息</td>
									<td><pre>${ex.errorMsg }</pre></td>
								</tr>
								<c:if test="${ex.cause  ne null}">
								<tr>
									<td style="width: 200px">处理时间</td>
									<td><fmt:formatDate value='${ex.doneTime }' type="date"
											pattern="yyyy-dd-MM hh:mm:ss" /></td>
								</tr>
								<tr>
									<td style="width: 200px">处理人</td>
									<td>${ex.doneMan }</td>
								</tr>
								</c:if>
								<tr>
									<td style="width: 200px">产生原因</td>
									<td><textarea rows="4" name="cause" class="form-control">${ex.cause }</textarea>
									</td>
								</tr>
								<tr>
									<td style="width: 200px">解决方案</td>
									<td><textarea rows="4" name="solution" id="artcontent"
											class="form-control">${ex.solution }</textarea></td>
								</tr>
								<tr>
									<td colspan="2" style="text-align: center;">
										<button class="btn btn-success" onclick="myForm.submit()" >保存</button>
									</td>
								</tr>
							</table>
						</form>
					</div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<div class="col-sm-12">
				<div class="panel panel-danger">
					<div class="panel-heading">
						<h3 class="panel-title">相似异常</h3>
					</div>
					<div class="panel-body" id="appBox2">
						 <ul>
						 	<c:forEach var="item" items="${simeException }">
						 		<li><a href="${path }/showExcptionUrl?id=${item.id}">${item.projName }${item.projNo }-${item.exceptionType} -${item.cause }</a></li>
						 	</c:forEach>
						 </ul>
					</div>
				</div>
			</div>
		</div>
		
		
	</div>
</body>
<script type="text/javascript">
var editor1 = null;
var editor2 = null;
	var myForm=MForm.initForm({
		invokeUrl:"${path}/admin/solutionException",
		beforeSubmit:function(){
			editor1.sync();
			editor2.sync();
		},
	});
	MUI.createEdit("solution", '100%', '400px', 'editor1');
	MUI.createEdit("cause", '100%', '400px', 'editor2');
	</script>
</html>